package cn.wolfcode.service.impl;

import cn.wolfcode.dao.IStudentDAO;
import cn.wolfcode.domain.Student;
import cn.wolfcode.service.IStudentService;

public class StudentServiceImpl implements IStudentService {
    private IStudentDAO studentDAO;

    public void setStudentDAO(IStudentDAO studentDAO) {
        this.studentDAO = studentDAO;
    }

    @Override
    public void register(String username, String password) throws Exception {
        studentDAO.save(username,password);

    }

    @Override
    public void register2(Student student) throws Exception {
        studentDAO.insert(student);
    }
}
